#!/usr/bin/env python3
import re

# Path to the file
file_path = 'cpp_flow_map/Tools/CppCodeParser.py'

# Read the file content
with open(file_path, 'r') as f:
    content = f.read()

# Replace all instances of (?P<n> with (?P<name> in regex patterns
modified_content = re.sub(r'\(\?P<n>', r'(?P<name>', content)

# Write back the modified content
with open(file_path, 'w') as f:
    f.write(modified_content)

print(f"Fixed regex patterns in {file_path}") 